﻿using System;

namespace RattlerRace
{
    /// <summary>
    /// Razred Points, avtor Denis Jakoša
    /// </summary>
    

    [Serializable()]
    public class Points
    {
        private int _currentPoints;
        private string _player;

        public Points()
        {
            _currentPoints = 0;
            _player = "";
        }

        /* KOMENTAR
         * Ta konstruktor sem dodal (Mitja Fleišaker), ker ga potrebujem za delo v razredu Scoreboard
         */
        public Points(string p, int cp)
        {
            _currentPoints = cp;
            _player = p;
        }

        public int CurrentPoints
        {
            get { return _currentPoints; }
            set { _currentPoints = value; }
        }

        public string Player
        {
            get { return _player; }
            set { _player = value; }
        }

        /// <summary>
        /// Metoda preveri, če se točke končajo s številom 50.
        /// </summary>
        /// <returns>Metoda vrne true, če se točke končajo s številom 50, in false, če se ne.</returns>
        public static bool endsWith50(int p)
        {
            return (p % 100 >= 47 && p % 100 <= 54);
        }

    }
}
